package com.lkj;

import oshi.SystemInfo;
import oshi.hardware.CentralProcessor;
import oshi.hardware.HardwareAbstractionLayer;
import oshi.software.os.OperatingSystem;

public class Main {

    public static void main(String[] args) {

        SystemInfo info = new SystemInfo();
        OperatingSystem os = info.getOperatingSystem();
        System.out.println(os.getVersionInfo().getBuildNumber());
        System.out.println(os.getVersionInfo().getCodeName());
        System.out.println(os.getVersionInfo().getVersion());


        HardwareAbstractionLayer hardware = info.getHardware();
        System.out.println(hardware);

        CentralProcessor processor = hardware.getProcessor();

        String name = processor.getProcessorIdentifier().getName();

        int physicalPackageCount = processor.getPhysicalPackageCount();

        int physicalProcessorCount = processor.getPhysicalProcessorCount();

        System.out.println(name);
        System.out.println(physicalPackageCount);
        System.out.println(physicalProcessorCount);


    }
}
